chore(clerk-js): Use local environment on outage - #5420
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 9bad073 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| .catch(e => { | ||
| const environmentSnapshot = SafeLocalStorage.getItem<EnvironmentJSONSnapshot | null>( | ||
| CLERK_ENVIRONMENT_STORAGE_ENTRY, | ||
| null, | ||
| ); | ||
|
|
||
| if (!environmentSnapshot) { | ||
| throw e; | ||
| } | ||
|
|
||
| this.updateEnvironment(new Environment(environmentSnapshot)); |
There was a problem hiding this comment.
I am wondering if this logic shouldn't be contained within the EnvironmentResource class. Seems like it could simplify the implementation overall
There was a problem hiding this comment.
I am a bit confused here, are you advocating for this to be included in the Environment class because currently it is not.
If that is the case, I'd suggest doing this in another follow up PR, which will improve the overall architecture which would handle this for non-standard browsers (e.g. Expo).
There was a problem hiding this comment.
@panteliselef Yes, I think having this logic be encapsulated in the EnvrionmentResource class would be preferrable. No issue with doing it as a follow up
…-locally # Conflicts: # packages/clerk-js/bundlewatch.config.json
|
!snapshot |
|
Hey @panteliselef - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.0.16-snapshot.v20250326201838 --save-exact
npm i @clerk/astro@2.4.5-snapshot.v20250326201838 --save-exact
npm i @clerk/backend@1.25.8-snapshot.v20250326201838 --save-exact
npm i @clerk/chrome-extension@2.2.23-snapshot.v20250326201838 --save-exact
npm i @clerk/clerk-js@5.58.1-snapshot.v20250326201838 --save-exact
npm i @clerk/elements@0.23.8-snapshot.v20250326201838 --save-exact
npm i @clerk/clerk-expo@2.9.6-snapshot.v20250326201838 --save-exact
npm i @clerk/expo-passkeys@0.1.29-snapshot.v20250326201838 --save-exact
npm i @clerk/express@1.3.59-snapshot.v20250326201838 --save-exact
npm i @clerk/fastify@2.1.32-snapshot.v20250326201838 --save-exact
npm i @clerk/localizations@3.13.4-snapshot.v20250326201838 --save-exact
npm i @clerk/nextjs@6.12.12-snapshot.v20250326201838 --save-exact
npm i @clerk/nuxt@1.4.6-snapshot.v20250326201838 --save-exact
npm i @clerk/clerk-react@5.25.5-snapshot.v20250326201838 --save-exact
npm i @clerk/react-router@1.1.11-snapshot.v20250326201838 --save-exact
npm i @clerk/remix@4.5.11-snapshot.v20250326201838 --save-exact
npm i @clerk/shared@3.2.3-snapshot.v20250326201838 --save-exact
npm i @clerk/tanstack-react-start@0.12.2-snapshot.v20250326201838 --save-exact
npm i @clerk/testing@1.4.33-snapshot.v20250326201838 --save-exact
npm i @clerk/themes@2.2.26-snapshot.v20250326201838 --save-exact
npm i @clerk/types@4.50.1-snapshot.v20250326201838 --save-exact
npm i @clerk/vue@1.4.5-snapshot.v20250326201838 --save-exact |
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change